package com.gtenacg.cartoonservice.service;

import com.gtenacg.cartoonservice.pojo.model.*;
import com.gtenacg.cartoonservice.pojo.vo.NovelVo;
import org.springframework.dao.DuplicateKeyException;

import java.util.List;

/**
* @author 86198
* @description 针对表【gt_novel(小说表)】的数据库操作Service
* @createDate 2024-05-22 08:46:33
*/
public interface NovelService {

    List<Novel> list();

    List<Novel> search(String name);

    List<Novel> random(Integer num);

    List<Novel> getByNids(List<Integer> nids);

    void update(Novel novel);

    Integer insert(Novel novel) throws DuplicateKeyException;

    void delete(List<Integer> nids);


    List<NovelVo> assembleNovelVo(List<Novel> novels,
                                  List<NovelType> types, List<RelationNovelType> relationTypes,
                                  List<Author> authors, List<RelationNovelAuthor> relationAuthors);

    List<String> getChapterList(Novel novel);
}
